package com.cy.service;

import com.cy.dao.MerchDao;
import com.cy.pojo.Merch;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author qyq
 * @create 2021-03-01-14:34
 */
@Service
public class MerchServiceImpl implements MerchService{


    @Autowired
    private MerchDao merchDao;

    @Override
    public List<Merch> findMerchs() {
        return merchDao.findMerchs();
    }

    @Override
    public int saveMerch(Merch merch) {
        int rows = merchDao.insertMerch(merch);
        return rows;
    }

    @Override
    public int deleteId(Integer id) {
        int rows = merchDao.deleteId(id);
        return rows;
    }

    @Override
    public Merch findId(Integer id) {
        return merchDao.findId(id);
    }

    @Override
    public int updateMerch(Merch merch) {
        return merchDao.updateMerch(merch);
    }


}
